#include <QLocale>
#include <QTranslator>
#include <QtGui/QApplication>
#include "qmlapplicationviewer.h"

Q_DECL_EXPORT int main(int argc, char *argv[])
{
    QScopedPointer<QApplication> app(createApplication(argc, argv));

    // Built-in language for app is Dutch
    // For every other locale, use the English translation.
    QTranslator translator;

    if (QLocale::system().language() != QLocale::Dutch) {
        translator.load(QString("tr_en"), QString(":/"));
        app->installTranslator(&translator);
    }


    QmlApplicationViewer viewer;
    viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
    viewer.setMainQmlFile(QLatin1String("qml/buienradar/main.qml"));
    viewer.showExpanded();

    return app->exec();
}
